Class ParserViewImpl

java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.ParserViewImpl
All Implemented Interfaces:
IPCObject, ParserView

public class ParserViewImpl extends IPCObjectImpl implements ParserView
Information provided by the PKI file:

    \class ParserView
    
    \brief ParserView handles and manipulates parser views.
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • setSecret

      public void setSecret(String secretStr)
      Information provided by the PKI file:
      
          \brief Sets the secret.
          
          \param secretStr, the secret.
          
              
      Specified by:
      setSecret in interface ParserView
      Parameters:
      secretStr - Takes in a parameter of secretStr
    • getSecret

      public String getSecret()
      Information provided by the PKI file:
      
          \brief Returns the secret.
          
          \return string, the secret.
          
              
      Specified by:
      getSecret in interface ParserView
      Returns:
      String Returns a String
    • addCommand

      public boolean addCommand(String mode, String command, boolean bAll, ViewCommandAction action)
      Information provided by the PKI file:
      
          \brief Adds the specified command to the view.
          
          \param mode, the mode to add the command to. Valid modes: user, enable, global.
          \param command, the command of interest.
          \param bAll, true to include all, false to not include all.
          \param action,      the view command action.
          Actions:    eViewCommandInclude = 0,
          eViewCommandExclude = 1,
          eViewCommandIncludeExclusive = 2
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      addCommand in interface ParserView
      Parameters:
      mode - Takes in a parameter of mode
      command - Takes in a parameter of command
      bAll - Takes in a parameter of bAll
      action - Takes in a parameter of action
      Returns:
      boolean Returns a boolean
    • removeCommand

      public boolean removeCommand(String mode, String command, ViewCommandAction action)
      Information provided by the PKI file:
      
          \brief Removes the specified command from the view.
          
          \param mode, the mode to remove the command from. Valid modes: user, enable, global.
          \param command, the command of interest.
          \param action,      the view command action.
          Actions:    eViewCommandInclude = 0,
          eViewCommandExclude = 1,
          eViewCommandIncludeExclusive = 2
          
          \return bool, true if successful, otherwise false.
          
              
      Specified by:
      removeCommand in interface ParserView
      Parameters:
      mode - Takes in a parameter of mode
      command - Takes in a parameter of command
      action - Takes in a parameter of action
      Returns:
      boolean Returns a boolean
    • getModeCount

      public int getModeCount()
      Information provided by the PKI file:
      
          \brief Returns the number of modes.
          
          \return int, the number of modes.
          
              
      Specified by:
      getModeCount in interface ParserView
      Returns:
      int Returns a int
    • getModeAt

      public String getModeAt(int index)
      Information provided by the PKI file:
      
          \brief Returns the mode at the specified index.
          
          \param index, the index of the mode of interest.
          
          \return string, mode at the specified index.
          
              
      Specified by:
      getModeAt in interface ParserView
      Parameters:
      index - Takes in a parameter of index
      Returns:
      String Returns a String
    • getIncludeCommandForModeCount

      public int getIncludeCommandForModeCount(String mode)
      Information provided by the PKI file:
      
          \brief Returns the number of include commands for the specified mode.
          
          \param mode, the mode of interest. Valid modes: user, enable, global.
          
          \return int, the number of include commands for the specified mode.
          
              
      Specified by:
      getIncludeCommandForModeCount in interface ParserView
      Parameters:
      mode - Takes in a parameter of mode
      Returns:
      int Returns a int
    • getIncludeCommandForModeAt

      public Pair<String,Boolean> getIncludeCommandForModeAt(String mode, int index)
      Information provided by the PKI file:
      
          \brief Returns the include command in the specified mode at the specified index.
          
          \param mode, the mode of interest. Valid modes: user, enable, global.
          \param index, the index of the include command of interest.
          
          \return pair<string, bool>, the include command and a boolean value that is true if included in all, otherwise false.
          
              
      Specified by:
      getIncludeCommandForModeAt in interface ParserView
      Parameters:
      mode - Takes in a parameter of mode
      index - Takes in a parameter of index
      Returns:
      Pair<String, Boolean> Returns a Pair<String, Boolean>
    • getIncludeCommandForMode

      public Pair<String,Boolean> getIncludeCommandForMode(String mode, String command)
      Information provided by the PKI file:
      
          \brief Returns the include command in the specified mode with the specified command.
          
          \param mode, the mode of interest. Valid modes: user, enable, global.
          \param command, the command of interest.
          
          \return pair<string, bool>, the include command and a boolean value that is true if included in all, otherwise false.
          
              
      Specified by:
      getIncludeCommandForMode in interface ParserView
      Parameters:
      mode - Takes in a parameter of mode
      command - Takes in a parameter of command
      Returns:
      Pair<String, Boolean> Returns a Pair<String, Boolean>
    • incrementUserCount

      public void incrementUserCount()
      Information provided by the PKI file:
      
          \brief Increments the number of users.
          
              
      Specified by:
      incrementUserCount in interface ParserView
    • decrementUserCount

      public void decrementUserCount()
      Information provided by the PKI file:
      
          \brief Decrements the number of users.
          
              
      Specified by:
      decrementUserCount in interface ParserView
    • getUserCount

      public int getUserCount()
      Information provided by the PKI file:
      
          \brief Returns the number of users.
          
          \return int, the number of users.
          
              
      Specified by:
      getUserCount in interface ParserView
      Returns:
      int Returns a int
    • isCommandAdded

      public boolean isCommandAdded(String commandStr)
      Information provided by the PKI file:
      
          \brief Returns true if the specified command is already added to this view, otherwise false.
          
          \param commandStr, the command string to use.
          
          \return bool, true if the specified command is already added to this view, otherwise false.
          
              
      Specified by:
      isCommandAdded in interface ParserView
      Parameters:
      commandStr - Takes in a parameter of commandStr
      Returns:
      boolean Returns a boolean